<?php
class smarty_ext_letters {

	function smarty_ext_letters() {
		global $setupdata, $mysqlclass, $lettersclass;
		$this->setupdata=$setupdata;
		$this->mysqlclass=$mysqlclass;
		$this->lettersclass=$lettersclass;
	}
	
	function get_all_source_types(){
		return $this->lettersclass->get_all_source_types();
	}
	
	function get_all_jobs(){
		return $this->lettersclass->get_all_jobs();
	}
	
	function get_job_data($params){
		if ((isset($params['job']) && (strlen($params['job']) > 0))){
			return $this->lettersclass->get_job_data($params['job']);
		}
	}
	
	function get_job_emails_count($params){
		if ((isset($params['job']) && (strlen($params['job']) > 0))){
			return $this->lettersclass->get_job_emails_count($params['job']);
		}
	}
	
	function get_job_status($params){
		if ((isset($params['job']) && (strlen($params['job']) > 0))){
			return $this->lettersclass->get_job_status($params['job']);
		}
	}
	
	function get_job_emails($params){
		if ((isset($params['job']) && (strlen($params['job']) > 0))){
			if ((isset($params['all'])) && ($params['all'] == 1)) return $this->lettersclass->get_job_emails($params['job'], 1);
			else return $this->lettersclass->get_job_emails($params['job'], 0);
		}
	}
	
	function get_blacklist(){
		return $this->lettersclass->get_blacklist();
	}
}
?>